package com.github.data_manage

import com.github.data_manage.util.DataUtils.standardDeviation
import org.junit.jupiter.api.Test
import org.springframework.boot.test.context.SpringBootTest
import java.math.BigDecimal

/**
 * @author chenhainan
 * @since 2025-04-21 20:44
 */
//@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
class FundYtdTests {

    @Test
    fun standardDeviationTest() {
        val value = listOf(
            0.53,
            0.10,
            -0.74,
            -1.07,
            0.91,
            -1.78,
            3.32,
            0.39,
            3.17,
            4.22,
            3.26,
            -0.76,
            2.79,
            1.08,
            0.70,
            4.15,
            4.42,
            7.51,
            -2.28,
            2.22,
            1.43,
            9.23,
            0.99,
            1.53,
            7.30,
            4.32,
            8.73,
            -0.77,
            1.64,
            1.47,
            -0.81,
            4.81,
            -2.38,
            3.70,

            ).map { BigDecimal.valueOf(it) }.standardDeviation()
        println(value)
    }

}